home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / megazone.c < prev    next >
C/C++ Source or Header  |  2000-05-04  |  16KB  |  490 lines

  1. /**************************************************************************
  2.  
  3. Based on drivers from Juno First emulator by Chris Hardy (chris@junofirst.freeserve.co.uk)
  4.  
  5. ***************************************************************************/
  6.  
  7. #include "driver.h"
  8. #include "vidhrdw/generic.h"
  9. #include "cpu/m6809/m6809.h"
  10. #include "cpu/i8039/i8039.h"
  11. #include "cpu/z80/z80.h"
  12.  
  13.  
  14. void konami1_decode(void);
  15.  
  16. extern unsigned char *megazone_scrollx;
  17. extern unsigned char *megazone_scrolly;
  18.  
  19. static unsigned char *megazone_sharedram;
  20.  
  21. extern unsigned char *megazone_videoram2;
  22. extern unsigned char *megazone_colorram2;
  23. extern size_t megazone_videoram2_size;
  24.  
  25. static int i8039_irqenable;
  26. static int i8039_status;
  27.  
  28. int megazone_vh_start(void);
  29. void megazone_vh_stop(void);
  30.  
  31. WRITE_HANDLER( megazone_flipscreen_w );
  32. void megazone_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  33. WRITE_HANDLER( megazone_sprite_bank_select_w );
  34. void megazone_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  35.  
  36.  
  37.  
  38. READ_HANDLER( megazone_portA_r )
  39. {
  40.     int clock,timer;
  41.  
  42.  
  43.     /* main xtal 14.318MHz, divided by 8 to get the AY-3-8910 clock, further */
  44.     /* divided by 1024 to get this timer */
  45.     /* The base clock for the CPU and 8910 is NOT the same, so we have to */
  46.     /* compensate. */
  47.     /* (divide by (1024/2), and not 1024, because the CPU cycle counter is */
  48.     /* incremented every other state change of the clock) */
  49.  
  50.     clock = cpu_gettotalcycles() * 7159/12288;    /* = (14318/8)/(18432/6) */
  51.     timer = (clock / (1024/2)) & 0x0f;
  52.  
  53.     /* low three bits come from the 8039 */
  54.  
  55.     return (timer << 4) | i8039_status;
  56. }
  57.  
  58. static WRITE_HANDLER( megazone_portB_w )
  59. {
  60.     int i;
  61.  
  62.  
  63.     for (i = 0;i < 3;i++)
  64.     {
  65.         int C;
  66.  
  67.  
  68.         C = 0;
  69.         if (data & 1) C +=  10000;    /*  10000pF = 0.01uF */
  70.         if (data & 2) C += 220000;    /* 220000pF = 0.22uF */
  71.         data >>= 2;
  72.         set_RC_filter(i,1000,2200,200,C);
  73.     }
  74. }
  75.  
  76. WRITE_HANDLER( megazone_videoram2_w )
  77. {
  78.     if (megazone_videoram2[offset] != data)
  79.     {
  80.         megazone_videoram2[offset] = data;
  81.     }
  82. }
  83.  
  84. WRITE_HANDLER( megazone_colorram2_w )
  85. {
  86.     if (megazone_colorram2[offset] != data)
  87.     {
  88.         megazone_colorram2[offset] = data;
  89.     }
  90. }
  91.  
  92. READ_HANDLER( megazone_dip3_r )
  93. {
  94.     return(0xff);
  95. }
  96.  
  97. READ_HANDLER( megazone_sharedram_r )
  98. {
  99.     return(megazone_sharedram[offset]);
  100. }
  101.  
  102. WRITE_HANDLER( megazone_sharedram_w )
  103. {
  104.     megazone_sharedram[offset] = data;
  105. }
  106.  
  107. static WRITE_HANDLER( megazone_i8039_irq_w )
  108. {
  109.     if (i8039_irqenable)
  110.         cpu_cause_interrupt(2,I8039_EXT_INT);
  111. }
  112.  
  113. WRITE_HANDLER( i8039_irqen_and_status_w )
  114. {
  115.     i8039_irqenable = data & 0x80;
  116.     i8039_status = (data & 0x70) >> 4;
  117. }
  118.  
  119. static struct MemoryReadAddress readmem[] =
  120. {
  121.     { 0x2000, 0x2fff, MRA_RAM },
  122.     { 0x3000, 0x33ff, MRA_RAM },
  123.     { 0x3800, 0x3fff, megazone_sharedram_r },
  124.     { 0x4000, 0xffff, MRA_ROM },        /* 4000->5FFF is a debug rom */
  125.     { -1 }  /* end of table */
  126. };
  127.  
  128. static struct MemoryWriteAddress writemem[] =
  129. {
  130.     { 0x0007, 0x0007, interrupt_enable_w },
  131.     { 0x0800, 0x0800, watchdog_reset_w },
  132.     { 0x1800, 0x1800, MWA_RAM, &megazone_scrollx },
  133.     { 0x1000, 0x1000, MWA_RAM, &megazone_scrolly },
  134.     { 0x2000, 0x23ff, videoram_w, &videoram, &videoram_size },
  135.     { 0x2400, 0x27ff, megazone_videoram2_w, &megazone_videoram2, &megazone_videoram2_size },
  136.     { 0x2800, 0x2bff, colorram_w, &colorram },
  137.     { 0x2c00, 0x2fff, megazone_colorram2_w, &megazone_colorram2 },
  138.     { 0x3000, 0x33ff, MWA_RAM, &spriteram, &spriteram_size },
  139.     { 0x3800, 0x3fff, megazone_sharedram_w, &megazone_sharedram },
  140.     { 0x4000, 0xffff, MWA_ROM },
  141.     { -1 }  /* end of table */
  142. };
  143.  
  144. static struct MemoryReadAddress sound_readmem[] =
  145. {
  146.     { 0x0000, 0x1fff, MRA_ROM },
  147.     { 0x6000, 0x6000, input_port_0_r }, /* IO Coin */
  148.     { 0x6001, 0x6001, input_port_1_r }, /* P1 IO */
  149.     { 0x6002, 0x6002, input_port_2_r }, /* P2 IO */
  150.     { 0x6003, 0x6003, input_port_3_r }, /* DIP 1 */
  151.     { 0x8000, 0x8000, input_port_4_r }, /* DIP 2 */
  152.     { 0x8001, 0x8001, megazone_dip3_r }, /* DIP 3 - Not used */
  153.     { 0xe000, 0xe7ff, megazone_sharedram_r },  /* Shared with $3800->3fff of main CPU */
  154.     { -1 }  /* end of table */
  155. };
  156.  
  157. static struct MemoryWriteAddress sound_writemem[] =
  158. {
  159.     { 0x0000, 0x1fff, MWA_ROM },
  160.     { 0x2000, 0x2000, megazone_i8039_irq_w },    /* START line. Interrupts 8039 */
  161.     { 0x4000, 0x4000, soundlatch_w },            /* CODE  line. Command Interrupts 8039 */
  162.     { 0xa000, 0xa000, MWA_RAM },                /* INTMAIN - Interrupts main CPU (unused) */
  163.     { 0xc000, 0xc000, MWA_RAM },                /* INT (Actually is NMI) enable/disable (unused)*/
  164.     { 0xc001, 0xc001, watchdog_reset_w },
  165.     { 0xe000, 0xe7ff, megazone_sharedram_w },    /* Shared with $3800->3fff of main CPU */
  166.     { -1 }  /* end of table */
  167. };
  168.  
  169. static struct IOReadPort sound_readport[] =
  170. {
  171.     { 0x00, 0x02, AY8910_read_port_0_r },
  172.     { -1 }
  173. };
  174.  
  175. static struct IOWritePort sound_writeport[] =
  176. {
  177.     { 0x00, 0x00, AY8910_control_port_0_w },
  178.     { 0x02, 0x02, AY8910_write_port_0_w },
  179.     { -1 }    /* end of table */
  180. };
  181.  
  182. static struct MemoryReadAddress i8039_readmem[] =
  183. {
  184.     { 0x0000, 0x0fff, MRA_ROM },
  185.     { -1 }    /* end of table */
  186. };
  187.  
  188. static struct MemoryWriteAddress i8039_writemem[] =
  189. {
  190.     { 0x0000, 0x0fff, MWA_ROM },
  191.     { -1 }    /* end of table */
  192. };
  193.  
  194. static struct IOReadPort i8039_readport[] =
  195. {
  196.     { 0x00, 0xff, soundlatch_r },
  197.     { 0x111,0x111, IORP_NOP },
  198.     { -1 }
  199. };
  200.  
  201. static struct IOWritePort i8039_writeport[] =
  202. {
  203.     { I8039_p1, I8039_p1, DAC_0_data_w },
  204.     { I8039_p2, I8039_p2, i8039_irqen_and_status_w },
  205.     { -1 }    /* end of table */
  206. };
  207.  
  208. INPUT_PORTS_START( megazone )
  209.     PORT_START      /* IN0 */
  210.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  211.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  212.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  213.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
  214.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
  215.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  216.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  217.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  218.  
  219.     PORT_START      /* IN1 */
  220.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  221.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  222.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  223.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  224.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  225.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  226.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  227.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  228.  
  229.     PORT_START      /* IN2 */
  230.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  231.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  232.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL)
  233.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL)
  234.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  235.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  236.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  237.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  238.     PORT_START      /* DSW1 */
  239.  
  240.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
  241.     PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
  242.     PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
  243.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  244.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )
  245.     PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )
  246.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  247.     PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )
  248.     PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )
  249.     PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
  250.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  251.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
  252.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
  253.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
  254.     PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
  255.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )
  256.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  257.     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
  258.     PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )
  259.     PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )
  260.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  261.     PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )
  262.     PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )
  263.     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
  264.     PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )
  265.     PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )
  266.     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
  267.     PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )
  268.     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
  269.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
  270.     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
  271.     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )
  272.     PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )
  273.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  274.  
  275.     PORT_START      /* DSW2 */
  276.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  277.     PORT_DIPSETTING(    0x03, "3" )
  278.     PORT_DIPSETTING(    0x02, "4" )
  279.     PORT_DIPSETTING(    0x01, "5" )
  280.     PORT_BITX(0,        0x00, IPT_DIPSWITCH_SETTING | IPF_CHEAT, "Infinite", IP_KEY_NONE, IP_JOY_NONE )
  281.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) )
  282.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  283.     PORT_DIPSETTING(    0x04, DEF_STR( Cocktail ) )
  284.     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Bonus_Life ) )
  285.     PORT_DIPSETTING(    0x18, "20k 70k" )
  286.     PORT_DIPSETTING(    0x10, "20k 80k" )
  287.     PORT_DIPSETTING(    0x08, "30k 90k" )
  288.     PORT_DIPSETTING(    0x00, "30k 100k" )
  289.  
  290.     PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) )
  291.     PORT_DIPSETTING(    0x60, "Easy" )
  292.     PORT_DIPSETTING(    0x40, "Normal" )
  293.     PORT_DIPSETTING(    0x20, "Difficult" )
  294.     PORT_DIPSETTING(    0x00, "Very Difficult" )
  295.  
  296.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) )
  297.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  298.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  299.  
  300. INPUT_PORTS_END
  301.  
  302.  
  303.  
  304. static struct GfxLayout charlayout =
  305. {
  306.     8,8,    /* 8*8 characters */
  307.     512,    /* 512 characters */
  308.     4,      /* 4 bits per pixel */
  309.     { 0, 1, 2, 3 }, /* the four bitplanes are packed in one nibble */
  310.     { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 },
  311.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
  312.     32*8    /* every char takes 8 consecutive bytes */
  313. };
  314.  
  315. static struct GfxLayout spritelayout =
  316. {
  317.     16,16,    /* 16*16 sprites */
  318.     256,    /* 256 sprites */
  319.     4,    /* 4 bits per pixel */
  320.     { 0x4000*8+4, 0x4000*8+0, 4, 0 },
  321.     { 0, 1, 2, 3, 8*8+0, 8*8+1, 8*8+2, 8*8+3,
  322.             16*8+0, 16*8+1, 16*8+2, 16*8+3, 24*8+0, 24*8+1, 24*8+2, 24*8+3 },
  323.     { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 ,
  324.         32*8, 33*8, 34*8, 35*8, 36*8, 37*8, 38*8, 39*8, },
  325.     64*8    /* every sprite takes 64 consecutive bytes */
  326. };
  327.  
  328. static struct GfxDecodeInfo gfxdecodeinfo[] =
  329. {
  330.     { REGION_GFX1, 0, &charlayout,       0, 16 },
  331.     { REGION_GFX2, 0, &spritelayout, 16*16, 16 },
  332.     { -1 } /* end of array */
  333. };
  334.  
  335.  
  336.  
  337. static struct AY8910interface ay8910_interface =
  338. {
  339.     1,    /* 1 chip */
  340.     14318000/8,    /* 1.78975 MHz */
  341.     { 30 },
  342.     { megazone_portA_r },
  343.     { 0 },
  344.     { 0 },
  345.     { megazone_portB_w }
  346. };
  347.  
  348. static struct DACinterface dac_interface =
  349. {
  350.     1,
  351.     { 50 }
  352. };
  353.  
  354.  
  355.  
  356. static struct MachineDriver machine_driver_megazone =
  357. {
  358.     /* basic machine hardware */
  359.     {
  360.         {
  361.             CPU_M6809,
  362.             2048000,        /* 2 Mhz */
  363.             readmem,writemem,0,0,
  364.             interrupt,1
  365.         },
  366.         {
  367.             CPU_Z80,
  368.             18432000/6,     /* Z80 Clock is derived from the H1 signal */
  369.             sound_readmem,sound_writemem,sound_readport,sound_writeport,
  370.             interrupt,1
  371.         },
  372.         {
  373.             CPU_I8039 | CPU_AUDIO_CPU,
  374.             14318000/2/15,    /* 1/2 14MHz crystal */
  375.             i8039_readmem,i8039_writemem,i8039_readport,i8039_writeport,
  376.             ignore_interrupt,1
  377.         }
  378.     },
  379.     60, DEFAULT_60HZ_VBLANK_DURATION,       /* frames per second, vblank duration */
  380.     15,      /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  381.     0,
  382.  
  383.     /* video hardware */
  384.     36*8, 32*8, { 0*8, 36*8-1, 2*8, 30*8-1 },
  385.     gfxdecodeinfo,
  386.     32,16*16+16*16,
  387.     megazone_vh_convert_color_prom,
  388.  
  389.     VIDEO_TYPE_RASTER,
  390.     0,
  391.     megazone_vh_start,
  392.     megazone_vh_stop,
  393.     megazone_vh_screenrefresh,
  394.  
  395.     /* sound hardware */
  396.     0,0,0,0,
  397.     {
  398.         {
  399.             SOUND_AY8910,
  400.             &ay8910_interface
  401.         },
  402.         {
  403.             SOUND_DAC,
  404.             &dac_interface
  405.         }
  406.     }
  407. };
  408.  
  409.  
  410.  
  411. /***************************************************************************
  412.  
  413.   Game driver(s)
  414.  
  415. ***************************************************************************/
  416.  
  417. ROM_START( megazone )
  418.     ROM_REGION( 2*0x10000, REGION_CPU1 )     /* 64k for code + 64k for decrypted opcodes */
  419.     ROM_LOAD( "319i07.bin",    0x6000, 0x2000, 0x94b22ea8 )
  420.     ROM_LOAD( "319i06.bin",    0x8000, 0x2000, 0x0468b619 )
  421.     ROM_LOAD( "319i05.bin",    0xa000, 0x2000, 0xac59000c )
  422.     ROM_LOAD( "319i04.bin",    0xc000, 0x2000, 0x1e968603 )
  423.     ROM_LOAD( "319i03.bin",    0xe000, 0x2000, 0x0888b803 )
  424.  
  425.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the audio CPU */
  426.     ROM_LOAD( "319e02.bin",   0x0000, 0x2000, 0xd5d45edb )
  427.  
  428.     ROM_REGION( 0x1000, REGION_CPU3 )     /* 4k for the 8039 DAC CPU */
  429.     ROM_LOAD( "319e01.bin",   0x0000, 0x1000, 0xed5725a0 )
  430.  
  431.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  432.     ROM_LOAD( "319e12.bin",    0x0000, 0x2000, 0xe0fb7835 )
  433.     ROM_LOAD( "319e13.bin",    0x2000, 0x2000, 0x3d8f3743 )
  434.  
  435.     ROM_REGION( 0x08000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  436.     ROM_LOAD( "319e11.bin",    0x0000, 0x2000, 0xf36f19c5 )
  437.     ROM_LOAD( "319e09.bin",    0x2000, 0x2000, 0x5eaa7f3e )
  438.     ROM_LOAD( "319e10.bin",    0x4000, 0x2000, 0x7bb1aeee )
  439.     ROM_LOAD( "319e08.bin",    0x6000, 0x2000, 0x6add71b1 )
  440.  
  441.     ROM_REGION( 0x0260, REGION_PROMS )
  442.     ROM_LOAD( "319b18.a16",  0x0000, 0x020, 0x23cb02af ) /* palette */
  443.     ROM_LOAD( "319b16.c6",   0x0020, 0x100, 0x5748e933 ) /* sprite lookup table */
  444.     ROM_LOAD( "319b17.a11",  0x0120, 0x100, 0x1fbfce73 ) /* character lookup table */
  445.     ROM_LOAD( "319b14.e7",   0x0220, 0x020, 0x55044268 ) /* timing (not used) */
  446.     ROM_LOAD( "319b15.e8",   0x0240, 0x020, 0x31fd7ab9 ) /* timing (not used) */
  447. ROM_END
  448.  
  449. ROM_START( megaznik )
  450.     ROM_REGION( 2*0x10000, REGION_CPU1 )     /* 64k for code + 64k for decrypted opcodes */
  451.     ROM_LOAD( "ic59_cpu.bin",  0x6000, 0x2000, 0xf41922a0 )
  452.     ROM_LOAD( "ic58_cpu.bin",  0x8000, 0x2000, 0x7fd7277b )
  453.     ROM_LOAD( "ic57_cpu.bin",  0xa000, 0x2000, 0xa4b33b51 )
  454.     ROM_LOAD( "ic56_cpu.bin",  0xc000, 0x2000, 0x2aabcfbf )
  455.     ROM_LOAD( "ic55_cpu.bin",  0xe000, 0x2000, 0xb33a3c37 )
  456.  
  457.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the audio CPU */
  458.     ROM_LOAD( "319e02.bin",   0x0000, 0x2000, 0xd5d45edb )
  459.  
  460.     ROM_REGION( 0x1000, REGION_CPU3 )     /* 4k for the 8039 DAC CPU */
  461.     ROM_LOAD( "319e01.bin",   0x0000, 0x1000, 0xed5725a0 )
  462.  
  463.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  464.     ROM_LOAD( "ic40_vid.bin",  0x0000, 0x2000, 0x07b8b24b )
  465.     ROM_LOAD( "319e13.bin",    0x2000, 0x2000, 0x3d8f3743 )
  466.  
  467.     ROM_REGION( 0x08000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  468.     ROM_LOAD( "ic15_vid.bin",  0x0000, 0x2000, 0x965a7ff6 )
  469.     ROM_LOAD( "319e09.bin",    0x2000, 0x2000, 0x5eaa7f3e )
  470.     ROM_LOAD( "319e10.bin",    0x4000, 0x2000, 0x7bb1aeee )
  471.     ROM_LOAD( "319e08.bin",    0x6000, 0x2000, 0x6add71b1 )
  472.  
  473.     ROM_REGION( 0x0260, REGION_PROMS )
  474.     ROM_LOAD( "319b18.a16",  0x0000, 0x020, 0x23cb02af ) /* palette */
  475.     ROM_LOAD( "319b16.c6",   0x0020, 0x100, 0x5748e933 ) /* sprite lookup table */
  476.     ROM_LOAD( "319b17.a11",  0x0120, 0x100, 0x1fbfce73 ) /* character lookup table */
  477.     ROM_LOAD( "319b14.e7",   0x0220, 0x020, 0x55044268 ) /* timing (not used) */
  478.     ROM_LOAD( "319b15.e8",   0x0240, 0x020, 0x31fd7ab9 ) /* timing (not used) */
  479. ROM_END
  480.  
  481.  
  482. static void init_megazone(void)
  483. {
  484.     konami1_decode();
  485. }
  486.  
  487.  
  488. GAME( 1983, megazone, 0,        megazone, megazone, megazone, ROT90, "Konami", "Mega Zone" )
  489. GAME( 1983, megaznik, megazone, megazone, megazone, megazone, ROT90, "Konami / Interlogic + Kosuka", "Mega Zone (Kosuka)" )
  490.